﻿using System;
using System.Reflection;

namespace MessageTypeDescriber.Xml.Members
{
    [Serializable]
    public class PropertyDescription : MemberDescription
    {
        protected PropertyDescription() : base(null)
        {
        }

        public PropertyDescription(PropertyInfo property) : base(property)
        {
            Name = property.Name;
            ReturnType = new TypeDescription(property.PropertyType);
        }

        public override string MemberType
        {
            get { return "Property"; }
        }

        public override string Signature
        {
            get { return ReturnType.Signature + " " + Name; }
        }
    }
}